Skip to contentMethod: Command(String, int, OptionParser, String)
1: /*
2: * JOPA
3: * Copyright (C) 2024 Czech Technical University in Prague
4: *
5: * This library is free software; you can redistribute it and/or
6: * modify it under the terms of the GNU Lesser General Public
7: * License as published by the Free Software Foundation; either
8: * version 3.0 of the License, or (at your option) any later version.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library.
17: */
18: package cz.cvut.kbss.jopa.owl2java.cli;
19:
20: import joptsimple.OptionParser;
21:
22: public enum Command {
23: help(CommandParserProvider.getCommandHelp(), String.join(System.lineSeparator(),
24: "Help command gives hints on how to use other commands. Try 'OWL2Java help <command>' for"
25: + " more specific info.",
26: "", "Syntax: OWL2Java help <command>", "")),
27:
28: list(CommandParserProvider.getCommandList(), String
29: .join(System.lineSeparator(), "Lists all available IC contexts.", "",
30: "Syntax: OWL2Java list <ontology_iri> [ <options> ].", "")),
31:
32: transform(CommandParserProvider.getCommandTransform(), String
33: .join(System.lineSeparator(),
34: "Transforms all ICs into annotated Java classes.", "",
35: "Syntax: OWL2Java transform <ontology_iri> [ <options> ].", "")),
36:
37: vocabulary(CommandParserProvider.getCommandVocabulary(), String
38: .join(System.lineSeparator(), "Generates vocabulary based on the ICs.", "",
39: "Syntax: OWL2Java vocabulary <ontology_iri> [ <options> ].", "")),
40:
41: version(CommandParserProvider.getCommandVersion(), "Prints the version of the OWL2Java tool.");
42:
43: public final OptionParser parser;
44: public final String helpText;
45:
46: Command(OptionParser parser, String help) {
47: this.parser = parser;
48: this.helpText = help;
49: }
50: }